﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using HippoMapper.DAL.Base;

namespace Test
{
    class Mapper : DelayMapperGeneric<Entity>
    {
        public override void Add(Entity entity)
        {
            System.Console.WriteLine("ok");
        }

        public override void Delete(Entity entity)
        {
            throw new NotImplementedException();
        }

        public override void Update(Entity entity)
        {
            throw new NotImplementedException();
        }

        public override Entity Get(HippoMapper.IConditionParameter parameter)
        {
            return base.Get(parameter);
        }

        public override Entity Get(HippoMapper.IConditionParameter parameter, bool isLazy)
        {
            return new Entity()
            {
                A = null,
                B = "b"
            };
        }

        [DelayLoad("AA")]
        public static void LoadA(Entity e)
        {
            Console.WriteLine("Delay!!!");

            e.A = "aaaa";
        }
    }
}
